Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 6 - Transform Objects / Transform Objects Reference
Functions / Getting and Setting the Hit-Test Parameters


GXSetShapeHitTest

You can use the GXSetShapeHitTest function to assign hit-test parameters to the transform object associated with a particular shape.

void GXSetShapeHitTest(gxShape target, gxShapePart mask, 
                     Fixed tolerance);
target
A reference to the shape associated with the transform object whose hit-test parameters you want to assign.
mask
The shape-parts mask to assign to the transform.
tolerance
The hit-test tolerance to assign to the transform. It is measured in geometry units, and can be 0 or any positive number.
DESCRIPTION
The GXSetShapeHitTest function assigns the shape-parts mask contained in the mask parameter and the hit-test tolerance contained in the tolerance parameter to the transform object associated with the shape referenced by the target parameter. The tolerance value cannot be negative.

If the target shape shares its transform object with other shapes, this function first makes a copy of the transform object, associates it with the target shape, and then assigns the new hit-test parameters to the copy.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
parameter_out_of_range(debugging version)
tolerance_out_of_range(debugging version)
SEE ALSO
For an example of the use of this function, see page 6-30.

For information about the hit-test parameters property, see "Hit-Test Parameters" beginning on page 6-11. To interpret the values in the shape-parts mask, see Table 6-1 on page 6-12.

To retrieve the hit-test parameters from the transform associated with a specified shape, use the GXGetShapeHitTest function, described in the previous section.

To assign hit-test parameters directly to a transform object, use the GXSetTransformHitTest function, described on page 6-79.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996